package cc.yugu.yhdw.webserver.persistence.basic;

import cc.yugu.yhdw.common.domain.basic.CustomerForegiftOrder;
import cc.yugu.yhdw.common.persistence.MasterMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
/**
 * 用户押金记录映射
 *
 * @Date:Created in 2018/6/28 13:20
 * @Author:
 * @Modified By: zjn 2018/6/28 13:20
 */
public interface CustomerForegiftOrderMapper extends MasterMapper {
    /**
    * 根据主键id查询表bas_customer_foregift_order中押金信息
    *
    * @Param: [id]
    * @Return: cc.yugu.yhdw.common.domain.basic.CustomerForegiftOrder
    * @Author By: zjn 2018/6/28  13:21
    */
    CustomerForegiftOrder find(String id);
    /**
    * 根据表中不同字段查询对应的行数（总部查询）
    *
    * @Param: [customerForegiftOrder]
    * @Return: int
    * @Author By: zjn 2018/6/28  13:21
    */
    int findPageCount(CustomerForegiftOrder customerForegiftOrder);
    /**
    * 新增加：运营商代理商查询行数
    *
    * @Param: [customerForegiftOrder]
    * @Return: int
    * @Author By: zjn 2018/7/30  16:24
    */
    int findPageCounts(CustomerForegiftOrder customerForegiftOrder);
    /**
    * 分页查询， 根据表中的不同字段按照主键id降序查询对应数据信息（总部查询）
    *
    * @Param: [customerForegiftOrder]
    * @Return: java.util.List
    * @Author By: zjn 2018/6/28  13:25
    */
    List findPageResult(CustomerForegiftOrder customerForegiftOrder);
    /**
    * 新增加：运营商代理商分页查询
    *
    * @Param: [customerForegiftOrder]
    * @Return: java.util.List
    * @Author By: zjn 2018/7/30  16:24
    */
    List findPageResults(CustomerForegiftOrder customerForegiftOrder);
    /**
    * 根据客户id删除信息
    *
    * @Param: [customerId]
    * @Return: int
    * @Author By: zjn 2018/6/28  13:27
    */
    int deleteByCustomerId(@Param("customerId") long customerId);
    /**
    * 根据主键id更新数据信息
    *
    * @Param: [id, status, refundMoney, refundOperator, refundTime, refundPhoto, memo, handleTime]
    * @Return: int
    * @Author By: zjn 2018/6/28  13:29
    */
    int updateStatus(@Param("id") String id, @Param("status") int status,
                     @Param("refundMoney") int refundMoney,
                     @Param("refundOperator") String refundOperator,
                     @Param("refundTime") Date refundTime,
                     @Param("refundPhoto") String refundPhoto,
                     @Param("memo") String memo,
                     @Param("handleTime") Date handleTime);
    /**
    * 根据 所满足表中的不同字段 更新主键id所对应的信息
    *
    * @Param: [customerForegiftOrder]
    * @Return: int
    * @Author By: zjn 2018/6/28  13:30
    */
    int update(CustomerForegiftOrder customerForegiftOrder);
}
